class go extends Actor;



function make()
{
	local box a;
	local int i,b,T;
	local float omega;
	local Vector m,s;
	local StaticMeshComponent SMeshC;
	local StaticMesh sm;
	local MaterialInterface MI;
	
	`log("go");
	a = Spawn(class'box');
	m = vect(0, -500, 10);
	s = vect(0.5, 0.5, 5.0);
	a.StaticMesh.SetScale3D(s);
	a.Move(m);
	//`log(SMeshComponent2.GetMaterial(0).GetSurfaceHeight());
	T=5;

	
	for (i = 1; i < (8*T+1); i++)
	{
		if (i % 2 == 0)
		{
			b = 1;
		}
		else
		{
			b = 2;
		}
		`log("b"$i%5+1);

		SMeshC = new(self) class'StaticMeshComponent';
		//HU_Deco_Pipes.SM.Mesh.S_HU_Deco_Pipes_SM_PipeSetB05
		//FoliageDemo.Mesh.S_RuinsRoof_05
		sm = StaticMesh(DynamicLoadObject("FoliageDemo.Mesh.S_RuinsRoof_0"$i%5+1, class'StaticMesh'));	    
		SMeshC.SetStaticMesh(sm);
		if (i % 4 < 3 && i % 4 > 1)
		{
			`log("setting Material");
			//"Castle_Assets.Textures.M_Awning_05"
			MI = Material(DynamicLoadObject("EngineDebugMaterials.WireframeMaterial", class'Material'));
			//Mat = MI.GetMaterial();
			//Mat.DiffuseColor = 100;
			SMeshC.SetMaterial(0, MI);
		}
		else
		{
			MI = Material(DynamicLoadObject("Castle_Assets.Textures.M_Awning_0"$i%5+1, class'Material'));
			SMeshC.SetMaterial(0, MI);
		}

		omega = (i*Pi)/4;
		s = vect(0.2, 0.2, 0.2);
		SMeshC.SetScale3D(s);
		
		`log(omega*(180/Pi));
		m.X = 200*Cos(omega);
		m.Y = 200*Sin(omega);
		m.Z = i*i;
		//m = vect(300*Cos(omega), 300*Sin(omega), 5*i*i);
		SMeshC.SetTranslation(m);
		a.AttachComponent(SMeshC);
	}
}


DefaultProperties
{
}
